3.898 \(\int (a+i a \tan (e+f x))^2 (c-i c \tan (e+f x))^2 \, dx\)

Optimal. Leaf size=38 \[ \frac{a^2 c^2 \tan ^3(e+f x)}{3 f}+\frac{a^2 c^2 \tan (e+f x)}{f} \]

[Out]

(a^2*c^2*Tan[e + f*x])/f + (a^2*c^2*Tan[e + f*x]^3)/(3*f)

________________________________________________________________________________________

Rubi [A]  time = 0.0623472, antiderivative size = 38, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 2, integrand size = 31, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.065, Rules used = {3522, 3767} \[ \frac{a^2 c^2 \tan ^3(e+f x)}{3 f}+\frac{a^2 c^2 \tan (e+f x)}{f} \]

Antiderivative was successfully verified.

[In]

Int[(a + I*a*Tan[e + f*x])^2*(c - I*c*Tan[e + f*x])^2,x]

[Out]

(a^2*c^2*Tan[e + f*x])/f + (a^2*c^2*Tan[e + f*x]^3)/(3*f)

Rule 3522

Int[((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_.)*((c_) + (d_.)*tan[(e_.) + (f_.)*(x_)])^(n_.), x_Symbol] :> Di
st[a^m*c^m, Int[Sec[e + f*x]^(2*m)*(c + d*Tan[e + f*x])^(n - m), x], x] /; FreeQ[{a, b, c, d, e, f, n}, x] &&
EqQ[b*c + a*d, 0] && EqQ[a^2 + b^2, 0] && IntegerQ[m] &&  !(IGtQ[n, 0] && (LtQ[m, 0] || GtQ[m, n]))

Rule 3767

Int[csc[(c_.) + (d_.)*(x_)]^(n_), x_Symbol] :> -Dist[d^(-1), Subst[Int[ExpandIntegrand[(1 + x^2)^(n/2 - 1), x]
, x], x, Cot[c + d*x]], x] /; FreeQ[{c, d}, x] && IGtQ[n/2, 0]

Rubi steps

\begin{align*} \int (a+i a \tan (e+f x))^2 (c-i c \tan (e+f x))^2 \, dx &=\left (a^2 c^2\right ) \int \sec ^4(e+f x) \, dx\\ &=-\frac{\left (a^2 c^2\right ) \operatorname{Subst}\left (\int \left (1+x^2\right ) \, dx,x,-\tan (e+f x)\right )}{f}\\ &=\frac{a^2 c^2 \tan (e+f x)}{f}+\frac{a^2 c^2 \tan ^3(e+f x)}{3 f}\\ \end{align*}

Mathematica [A]  time = 0.0495802, size = 29, normalized size = 0.76 \[ \frac{a^2 c^2 \left (\frac{1}{3} \tan ^3(e+f x)+\tan (e+f x)\right )}{f} \]

Antiderivative was successfully verified.

[In]

Integrate[(a + I*a*Tan[e + f*x])^2*(c - I*c*Tan[e + f*x])^2,x]

[Out]

(a^2*c^2*(Tan[e + f*x] + Tan[e + f*x]^3/3))/f

________________________________________________________________________________________

Maple [A]  time = 0.003, size = 28, normalized size = 0.7 \begin{align*}{\frac{{a}^{2}{c}^{2}}{f} \left ({\frac{ \left ( \tan \left ( fx+e \right ) \right ) ^{3}}{3}}+\tan \left ( fx+e \right ) \right ) } \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a+I*a*tan(f*x+e))^2*(c-I*c*tan(f*x+e))^2,x)

[Out]

1/f*a^2*c^2*(1/3*tan(f*x+e)^3+tan(f*x+e))

________________________________________________________________________________________

Maxima [A]  time = 1.6742, size = 47, normalized size = 1.24 \begin{align*} \frac{a^{2} c^{2} \tan \left (f x + e\right )^{3} + 3 \, a^{2} c^{2} \tan \left (f x + e\right )}{3 \, f} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+I*a*tan(f*x+e))^2*(c-I*c*tan(f*x+e))^2,x, algorithm="maxima")

[Out]

1/3*(a^2*c^2*tan(f*x + e)^3 + 3*a^2*c^2*tan(f*x + e))/f

________________________________________________________________________________________

Fricas [C]  time = 1.13645, size = 181, normalized size = 4.76 \begin{align*} \frac{12 i \, a^{2} c^{2} e^{\left (2 i \, f x + 2 i \, e\right )} + 4 i \, a^{2} c^{2}}{3 \,{\left (f e^{\left (6 i \, f x + 6 i \, e\right )} + 3 \, f e^{\left (4 i \, f x + 4 i \, e\right )} + 3 \, f e^{\left (2 i \, f x + 2 i \, e\right )} + f\right )}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+I*a*tan(f*x+e))^2*(c-I*c*tan(f*x+e))^2,x, algorithm="fricas")

[Out]

1/3*(12*I*a^2*c^2*e^(2*I*f*x + 2*I*e) + 4*I*a^2*c^2)/(f*e^(6*I*f*x + 6*I*e) + 3*f*e^(4*I*f*x + 4*I*e) + 3*f*e^
(2*I*f*x + 2*I*e) + f)

________________________________________________________________________________________

Sympy [C]  time = 1.68066, size = 97, normalized size = 2.55 \begin{align*} \frac{\frac{4 i a^{2} c^{2} e^{- 4 i e} e^{2 i f x}}{f} + \frac{4 i a^{2} c^{2} e^{- 6 i e}}{3 f}}{e^{6 i f x} + 3 e^{- 2 i e} e^{4 i f x} + 3 e^{- 4 i e} e^{2 i f x} + e^{- 6 i e}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+I*a*tan(f*x+e))**2*(c-I*c*tan(f*x+e))**2,x)

[Out]

(4*I*a**2*c**2*exp(-4*I*e)*exp(2*I*f*x)/f + 4*I*a**2*c**2*exp(-6*I*e)/(3*f))/(exp(6*I*f*x) + 3*exp(-2*I*e)*exp
(4*I*f*x) + 3*exp(-4*I*e)*exp(2*I*f*x) + exp(-6*I*e))

________________________________________________________________________________________

Giac [B]  time = 1.6101, size = 224, normalized size = 5.89 \begin{align*} -\frac{3 \, a^{2} c^{2} \tan \left (f x\right )^{3} \tan \left (e\right )^{2} + 3 \, a^{2} c^{2} \tan \left (f x\right )^{2} \tan \left (e\right )^{3} + a^{2} c^{2} \tan \left (f x\right )^{3} - 3 \, a^{2} c^{2} \tan \left (f x\right )^{2} \tan \left (e\right ) - 3 \, a^{2} c^{2} \tan \left (f x\right ) \tan \left (e\right )^{2} + a^{2} c^{2} \tan \left (e\right )^{3} + 3 \, a^{2} c^{2} \tan \left (f x\right ) + 3 \, a^{2} c^{2} \tan \left (e\right )}{3 \,{\left (f \tan \left (f x\right )^{3} \tan \left (e\right )^{3} - 3 \, f \tan \left (f x\right )^{2} \tan \left (e\right )^{2} + 3 \, f \tan \left (f x\right ) \tan \left (e\right ) - f\right )}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+I*a*tan(f*x+e))^2*(c-I*c*tan(f*x+e))^2,x, algorithm="giac")

[Out]

-1/3*(3*a^2*c^2*tan(f*x)^3*tan(e)^2 + 3*a^2*c^2*tan(f*x)^2*tan(e)^3 + a^2*c^2*tan(f*x)^3 - 3*a^2*c^2*tan(f*x)^
2*tan(e) - 3*a^2*c^2*tan(f*x)*tan(e)^2 + a^2*c^2*tan(e)^3 + 3*a^2*c^2*tan(f*x) + 3*a^2*c^2*tan(e))/(f*tan(f*x)
^3*tan(e)^3 - 3*f*tan(f*x)^2*tan(e)^2 + 3*f*tan(f*x)*tan(e) - f)